import Vue from 'vue'
import Router from 'vue-router'
import store from "@/vuex/store"

import login from '@/components/page/login'
import dataScreen from '@/components/page/dataScreen'
import dataScreen2 from '@/components/page/dataScreen2'



Vue.use(Router)
export const constantRoutes = [{
    path: '/login',
    name: '登录',
    component: login,
    meta: {
      historyRoute: false,
      topTabs: false,
      leftNav: false,
    }
  },
  {
    path: '/',
    name: '大屏',
    component: dataScreen,
    meta: {
      historyRoute: false,
      topTabs: false,
      leftNav: false,
    }
  },
  {
    path: '/dataScreen2',
    name: '大屏',
    component: dataScreen2,
    meta: {
      historyRoute: false,
      topTabs: false,
      leftNav: false,
    }
  },


]

export default new Router({
  // mode: "history",
  base: process.env.NODE_ENV =='development'?"/dataScreen":'/dataScreen',
  scrollBehavior(to, from, savedPosition) { //路由跳转返回首页
    return {
      x: 0,
      y: 0
    }
  },
  routes: constantRoutes,

})
